export default {
  //付款方式
  payMent(that) {
    let pay_ment = {
      cash: '现金付款',
      bill_bank: '银行承兑',
      bill_com: '银行转账',
      all_goods: '先运输后付款',
      all_cash: '先付款后运输',
      partition: '预付款 货到结尾款',
      transfer: '银行转账',
      offline: '线下付款',
      credit: '先运输 结算日付款',
      order: '双方确认计划日',
      orderInfo: '双方确认计划日',
      goods: '货物到达后',
      goodsTraf: '付款方确认完成运输日',
      other: '第三方',
      minus: '减少',
      range: '增减',
      plus: '增加',
      FEMALE: '女',
      MALE: '男',
      coal: '煤炭',
      steel: '钢铁',
      alloy: '合金金属',
      flexible: '撮合报价',
      fix: '定价抢单',
      FOB: '出厂价',
      CIF: '到岸价',
      slag: '矿粉',
      pick_up: '提货',
      arrival: '到货',
      path_loss: '合理路耗',
      farming: '农业',
      car: '车',
      powder: '矿粉',
      price_remember: '理计价',
      price_weight: '过磅价',
      remember: '理计价',
      weight: '过磅价',
      tex_remember: '理计价',
      tax_weight: '过磅价',
      supply: '发货方',
      demand: '收货方',
      pass: '物流方',
      diver: '司机'
    }
    return pay_ment[that]
  },

  //产品种类
typeName(that){
    let type_name = {
        coal_donglimei: '动力煤',
        coal_wuyanmei: '无烟煤',
        coal_lianjiaomei: '喷吹煤',
        coal_yuanmei: '炼焦煤',
        coal_penchuimei: '原煤',
        steel_gaoxian: '高线',
        steel_panluo: '盘螺',
        steel_puxian: '普线',
        steel_luowengang: '螺纹钢',
        steel_gangpei: '钢坯',
        alloy_tie: '铁合金',
        slag_kuangzha: '矿渣',
        slag_weifen: '微粉',
        slag_kuangzhaweifenS95: '矿渣微粉S95',
        slag_kuangzhaweifenS105: '矿渣微粉S105',
        all_cash: '款到发货',
        all_goods: '货到付款',
        partition: '分期付款',
        credit: '信用付款',
        cash: '现汇结算',
        bill_bank: '银行承兑',
        bill_com: '商业承兑',
        coal: '煤炭',
        steel: '钢铁',
        alloy: '合金',
        slag: '矿粉',
        demand: '以采购方质检结果为准',
        supply: '以销售方质检结果为准',
        other: '以第三方质检结果为准',
        effective:'运输中',
        complete:'完成',
        FOB:'出厂价',
        CIF:'到岸价',
        gangtie:'钢铁',
        kuangshi:'矿石',
        meijiao:'煤焦',
        zaishengziyuan:'再生资源'
    }
    return type_name[that]
},
  //角色
  roleAll(that) {
    let role_all = {
      TRADE_ADMIN: '超管',
      TRADE_PURCHASE: '采购',
      TRADE_SALE: '销售',
      TRADE_MANUFACTURE: '生产',
      TRADE_FINANCE: '财务',
      TRAFFIC_ADMIN: '物流总负责人',
      TRAFFIC_EMPLOYEE: '物流管理员',
      TRAFFIC_CAPTAIN: '外部合作车队',
      TRAFFIC_DRIVER: '车辆',
      TRADE_STORAGE: '库管',
      TRADE_STORE: '库管',
      TRAFFIC_DRIVER_PUBLISH: '自有司机', //公有司机（公司所属）
      TRAFFIC_DRIVER_PRIVATE: '挂靠司机', //私人司机（挂靠司机）
      OWNER: '货源方', //20170406新增邀请人
      SALE: '销售商',
      PURCHASE: '货源方',
      TRAFFIC: '物流企业',
      COLLRAGUE: '同事',
      COLLEAGUE: '同事',
      STORAGE: '仓库',
      WORK: '合作企业',
      FRIEND: '好友',
      ZADMIN: '我的账号',
      DRIVER: '司机'
    }
    return role_all[that]
  },
  //支付方式
  payType(that) {
    let temp = that
    let payType1 = {
      WeChat: '微信',
      Alipay: '支付宝',
      Information: '信息费'
    }
    let payType2 = {
      withdeawals: '提现',
      recharge: '收入',
      information_expenditure: '支出',
      information_income: '收入'
    }
    let result = payType1[that.pay_method] + payType2[that.pay_surplus]
    return result
  },

  //物流订单详情页按钮状态
    tradeButton(that,step){
        let font='';
        let maps = {
            traffic_demand:'立即接单',
            traffic_plan:'等待派货',
            order_3:'指派车辆',
            order_effective:'继续指派',
            order_complete:'计划已完成'
        }
        font=maps[that]
        if(that=='order_effective' && step==4){
            font='货物运输进度'
        }
        return font
    },

    //接单状态
    receiptStatus(that){
        let receipt = {
            paying:'已派货，待司机支付信息费',
            paid:'已派货，司机已支付信息费',
            effective:'进行中',
            ineffective:'待接单',
            old_ineffective:'逾期未接单',
            complete:'已完成',
            wait_assign:'已接单，待派货',
            cancelled:'未付款，过期',
            not_pay:'无需支付'
        }
        return receipt[that]
    }
    ,

    //车辆型号
    carType(that){
        let car_type = {
            PING_BAN: '平板车',
            GAO_LAN: '高栏车',
            QIAN_SI_HOU_BA: '前四后八',
            BAN_GUA: '半挂',
            XIANG_SHI: '厢式',
            DAN_QIAO: '单桥',
            SI_QIAO: '四桥',
            DI_LAN: '低栏',
            SAN_QIAO: '三桥',
            HOU_BA_LUN: '后八轮',
            CHANG_PENG: '敞篷',
            QUAN_GUA: '全挂',
            ZHONG_LAN: '中栏',
            JIA_CHANG_GUA: '加长挂',
            BU_XIAN: '不限'
        }
        return car_type[that]
    },

    //订单状态
    orderStatus(that){
        let maps = {
            order_complete: '已完成',
            demand_driver:'待接单',
            plan_driver:'待派货',
            order_effective:'进行中',
            overdue_driver:'逾期未接单'
        }
        if(maps[that]){
            return maps[that]
        }else{
            return 'null'
        }

    }
}
